package com.zbw.service.impl;

import com.zbw.domain.Appoint;
import com.zbw.domain.Vo.BookVo;
import com.zbw.mapper.AppointMapper;
import com.zbw.service.IAppointService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AppointServiceImpl implements IAppointService {

    @Resource
    private AppointMapper appointMapper;

    /**
     * 查询预约列表
     * @param bookPartInfo
     * @return
     */
    @Override
    public List<BookVo> findAppointPartInfo(String bookPartInfo,String username) {
        return  appointMapper.findAppointPartInfo(bookPartInfo,username);
    }


    @Override
    public boolean insert(Appoint appoint) {
        return appointMapper.insert(appoint);
    }


    @Override
    public boolean update(Appoint appoint) {
        return appointMapper.update(appoint);
    }

    @Override
    public List<BookVo> findByBookId(Integer bookId, String userName) {
        return  appointMapper.findByBookId(bookId,userName);
    }

    @Override
    public List<BookVo> selectKeYuYueBooks() {
        return appointMapper.selectKeYuYueBooks();
    }

    @Override
    public void deleteBook(Integer bookId) {
        appointMapper.deleteBook(bookId);
    }
}
